public interface Factory {
    Operation getOperation();
}
// 加法工厂
class AddFactory implements Factory{
    @Override
    public Operation getOperation() {
        return new AddOperation();
    }
}
// 减法工厂
class SubFactory implements Factory{
    @Override
    public Operation getOperation() {
        return new SubOperation();
    }
}
// 乘法工厂
class MulFactory implements Factory{
    @Override
    public Operation getOperation() {
        return new MulOperation();
    }
}
// 除法工厂
class DivFactory implements Factory{
    @Override
    public Operation getOperation() {
        return new DivOperation();
    }
}